﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Krile.Kernel.Plugin.Operations.AgentElements;

namespace Mixture.PluginImpl
{
    public class StatusControl : IStatusControl
    {
        public bool RecvGlobalTimeline { get; set; }

        public void ReceiveStatuses()
        {
            Common.Receiver.Receive(null);
        }

        public bool Updatable
        {
            get { return true; }
        }

        public Krile.Kernel.OperationResult<object> Update(string text, ulong replyto, object affixObject)
        {
            throw new NotImplementedException();
        }

        public bool AutoCreateReplyOperationTriggers
        {
            get { return true; }
        }

        public ulong GetUidFromServiceStatusId(string id)
        {
            return Kernel.Storage.GetUid(id);
        }

        public bool ServiceStatusIdExists(string id)
        {
            return Kernel.Storage.GetUid(id) != 0;
        }

        #region Not supported
        public bool Destroiable
        {
            get { return false; }
        }

        public bool AutoCreateFavOperationTriggers
        {
            get { return false; }
        }

        public bool AutoCreateDeleteOperationTriggers
        {
            get { return false; }
        }

        public Krile.Kernel.OperationResult<object> Destroy(ulong uid)
        {
            throw new NotSupportedException();
        }

        public Krile.Kernel.OperationResult<object> SetFavorite(ulong uid, bool create)
        {
            throw new NotSupportedException();
        }

        #endregion
    }
}
